package com.spark.invoicings.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.math.BigDecimal;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

import lombok.Data;

/**
 * 销售退货表
 * 
 * @author sunyan
 * @email sunyan@gmail.com
 * @date 2024-06-13 11:13:52
 */
@Data
@TableName("t_sale_sales_return")
public class SalesReturn implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 * 销售退货ID
	 */
	@TableId(type = IdType.AUTO)
	private Integer returnId;
	/**
	 * 退货状态(1待申请, 2审判中, 3待到货, 4待入库, 5已入库, 6已驳回, 7已撤销)
	 */
	private Integer returnStatusId;
	/**
	 * 客户ID
	 */
	private Integer customerId;
	/**
	 * 订单ID
	 */
	private Integer orderId;
	/**
	 * 入库单ID
	 */
	private Integer inboundOrderId;
	/**
	 * 退货申请日期
	 */
	private Date returnApplicationDate;
	/**
	 * 退货审批完成日期
	 */
	private Date returnApprovalCompletionDate;
	/**
	 * 申请人
	 */
	private String applicant;
	/**
	 * 退货原因(1产品损坏, 2质量问题, 3运输问题, 4客户原因, 5其他)
	 */
	private Integer reasonReturnId;
	/**
	 * 备注
	 */
	private String remark;
	/**
	 * 应退款总额
	 */
	private double totalRefundAmount;
	/**
	 * 退货总额
	 */
	private Integer totalReturnQuantity;
	/**
	 * 退货负提成
	 */
	private double negativeCommission;
	/**
	 * 审批人
	 * */
	private String approver;
	/**
	 * 审批时间
	 * */
	private String approvalTime;

	@TableField(exist = false)
	private SalesOrder salesOrder;
	@TableField(exist = false)
    private SaleCustomer customer;
	@TableField(exist = false)
	private WarehouseReceipt warehouseReceipt;
    @TableField(exist = false)
	private List<ReturnDetail> returnDetails;

	public String getApprover() {
		return approver;
	}

	public void setApprover(String approver) {
		this.approver = approver;
	}

	public String getApprovalTime() {
		return approvalTime;
	}

	public void setApprovalTime(String approvalTime) {
		this.approvalTime = approvalTime;
	}

	public List<ReturnDetail> getReturnDetails() {
		return returnDetails;
	}

	public void setReturnDetails(List<ReturnDetail> returnDetails) {
		this.returnDetails = returnDetails;
	}

	public Integer getReturnId() {
		return returnId;
	}

	public void setReturnId(Integer returnId) {
		this.returnId = returnId;
	}

	public Integer getReturnStatusId() {
		return returnStatusId;
	}

	public void setReturnStatusId(Integer returnStatusId) {
		this.returnStatusId = returnStatusId;
	}

	public Integer getCustomerId() {
		return customerId;
	}

	public void setCustomerId(Integer customerId) {
		this.customerId = customerId;
	}

	public Integer getOrderId() {
		return orderId;
	}

	public void setOrderId(Integer orderId) {
		this.orderId = orderId;
	}

	public Integer getInboundOrderId() {
		return inboundOrderId;
	}

	public void setInboundOrderId(Integer inboundOrderId) {
		this.inboundOrderId = inboundOrderId;
	}

	public Date getReturnApplicationDate() {
		return returnApplicationDate;
	}

	public void setReturnApplicationDate(Date returnApplicationDate) {
		this.returnApplicationDate = returnApplicationDate;
	}

	public Date getReturnApprovalCompletionDate() {
		return returnApprovalCompletionDate;
	}

	public void setReturnApprovalCompletionDate(Date returnApprovalCompletionDate) {
		this.returnApprovalCompletionDate = returnApprovalCompletionDate;
	}

	public String getApplicant() {
		return applicant;
	}

	public void setApplicant(String applicant) {
		this.applicant = applicant;
	}

	public Integer getReasonReturnId() {
		return reasonReturnId;
	}

	public void setReasonReturnId(Integer reasonReturnId) {
		this.reasonReturnId = reasonReturnId;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public double getTotalRefundAmount() {
		return totalRefundAmount;
	}

	public void setTotalRefundAmount(double totalRefundAmount) {
		this.totalRefundAmount = totalRefundAmount;
	}

	public Integer getTotalReturnQuantity() {
		return totalReturnQuantity;
	}

	public void setTotalReturnQuantity(Integer totalReturnQuantity) {
		this.totalReturnQuantity = totalReturnQuantity;
	}

	public double getNegativeCommission() {
		return negativeCommission;
	}

	public void setNegativeCommission(double negativeCommission) {
		this.negativeCommission = negativeCommission;
	}

	public SalesOrder getSalesOrder() {
		return salesOrder;
	}

	public void setSalesOrder(SalesOrder salesOrder) {
		this.salesOrder = salesOrder;
	}

	public SaleCustomer getCustomer() {
		return customer;
	}

	public void setCustomer(SaleCustomer customer) {
		this.customer = customer;
	}

	public WarehouseReceipt getWarehouseReceipt() {
		return warehouseReceipt;
	}

	public void setWarehouseReceipt(WarehouseReceipt warehouseReceipt) {
		this.warehouseReceipt = warehouseReceipt;
	}
}
